package com.example;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * Created by joe on 17-4-21.
 */
@Component
public class DemoLisetener implements ApplicationListener<DemoEvent> {

  @Override
  public void onApplicationEvent(DemoEvent event) {
    String msg = event.getMsg();

    System.out.println("我(bean-demolitenner)接收到了bean-deniPublisher发布的消息： " + msg);
  }
}
